home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
GNULicense
/
ReadMe
< prev
next >
Wrap
Text File
|
1995-06-12
|
5KB
|
126 lines
(Hey, Emacs, this is -*- indented-text -*-)
Copyright (C) 1989 Jacob Gore <jacob@gore.com>
3044 S. Akron St., Denver, CO 80231-4605, USA
This package is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 1, or (at your option) any later
version.
This package is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program (in file COPYING); if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
WHAT: Description of the Package
This package was created to make it easier to include the GNU General
Public License (GPL) into the interface of a NextStep application.
It consists of three components:
1. An Interface Builder module (a .nib file) containing a sample Info
Panel. The Info Panel displays the copyright notice for the
application, and has a button for bringing up a License Panel. The
programmer would copy this sample info panel and paste it into the
NIB file for the application.
2. The source code to class GNULicense, and a NIB module that uses and
provides the License Panel, which displays the GPL (in rich text and
in a scroll view). This panel also has a "Print" button, for
printing the GPL.
3. The GPL itself, as a WriteNow document and as an RTF file.
HOW: Using This Package in an Application
The package was set up so that the entire procedure of merging it into an
application could be performed inside Interface Builder. There are two
steps involved: (1) copying and customizing the Info Panel, and
(2) connecting the License Panel to its "License" button.
0. Preparation
Copy the files GNULicense.h, GNULicense.m and GNULicense.nib into
your project directory. Get into the Interface Builder.
1. Copying and customizing the Info Panel
Open the file SampleInfoPanel.nib (it doesn't have to be in your
project directory, and it won't be included in your project).
1.a. If you have not done anything of consequence to the InfoPanel
object in your application:
Select InfoPanel and copy it to the pasteboard. That's all you
need from SampleInfoPanel.nib, so you can close or hide it now.
Open your application's nib file, select its "objects" window
and paste. The sample Info Panel will be added to it, and
called "Panel" (or "Panel1", etc.).
Delete the old InfoPanel object and rename the new info panel
object into "InfoPanel". Connect the "Info" item in the
application's main menu to the "makeKeyAndOrderFront:" action
of the new InfoPanel.
1.b. If you already have an elaborate InfoPanel in your application:
Copy the copyright box from the InfoPanel object in
SampleInfoPanel and paste it into the InfoPanel object in your
application. Don't forget the copyright (c-in-a-circle)
symbol, which is just floating on top of the title of the
copyright box (because box titles aren't multifont, and that
character is in the Symbol font).
Edit the strings and icons appropriately. (Unless you REALLY want
James T. Kirk to hold the copyright of your application:-)
2. Connecting the License Panel
The License Panel lives in its own interface file, GNULicense.nib.
It contains a rather large text object, and there is rarely any need
to have it loaded at launch time. The GNULicense object serves as
the link between NIB modules.
Using the class browser, create a subclass of Object, name it
"GNULicense", then parse it in. Instantiate it (recommendation: call
the instance "License Panel"). Connect the "License" button on the
InfoPanel to the "showLicense:" action of License Panel.
Add GNULicense.[hm] and GNULicense.nib to the project.
That's it. Save, save, save! :-)
WHERE: Installation Considerations
File GNULicense.wn should be installed as
/LocalLibrary/GNU/GNULicense.wn
(or, if NeXT starts distributing this package, in
/NextLibrary/GNU/GNULicense.wn),
where all GNU software can refer to it. Alternately, it can be installed
by individual users as
~/Library/GNU/GNULicense.wn .
The file GNULicense.rtf is not used by the package. It corresponds to
the text included in the scroll view of the License Panel, and is
provided for convenience.
TO DO:
If somebody can tell me how to print the license without invoking
WriteNow (but still provide the user with the convenience of the Print
Panel), I'll be very grateful.